<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class Course extends Model
{
    use HasFactory;
    protected $table = 'courses';
    public $timestamps = false;


    public static $imgs = [
        '0f4dbe6708d1056205400304.jpg',
        '6f77826708d3f3b205400304.jpg',
        'd0dd496708c7d2d605400304.jpg',
        'a215806709c7eb2f05400304.jpg',
        '316b3b6708bfe4bd05400304.jpg',
        '616e59ae09168c8705400304.jpg',
        '5fc064770975eecc05400304.jpg',
        '65153c91086f46f205400304.jpg',
        '651513cd08dd8e5b05400304.jpg',
        '64eeab2b08040f0e05400304.jpg',
        '64f54dba09001d8a05400304.jpg',
        '667d025b096bd81305400304.jpg',
        '64e2d2bd09b4a58905400304.jpg',
        '6638428c0959bfec00000000.jpg'
    ];

    public function teacher()
    {
        return $this->belongsTo(Teacher::class, 'teacher_id');
    }

    public static function pluckInfo()
    {
        return self::all()->pluck('name', 'id');

    }

}
